package com.education.web.api.admin.service;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.education.web.common.core.base.BaseService;
import com.education.web.api.admin.mapper.SystemAdminRoleMapper;
import com.education.web.entity.SystemAdminRole;
import org.springframework.stereotype.Service;


/**
 * @author zengjintao
 * @version 1.0
 * @create_at 2020/3/8 14:44
 */
@Service
public class SystemAdminRoleService extends BaseService<SystemAdminRoleMapper, SystemAdminRole> {

    public int deleteByAdminId(Integer adminId) {
        LambdaQueryWrapper lambdaQueryWrapper = Wrappers.<SystemAdminRole>lambdaQuery()
                .eq(SystemAdminRole::getAdminId, adminId);
        return baseMapper.delete(lambdaQueryWrapper);
    }
}
